<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改功能模块')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-module-edit" th:object="${mdModule}">
            <input name="moduleId" th:field="*{moduleId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required" title="代码在一个系统内，唯一标识一个功能模块的代码(系统代码+功能模块代码，必须是全局唯一的)。只能由英文字母、数字、下划线、短横线、小数点组成。">功能模块：</label>
                <div class="col-sm-8">
                    <input name="moduleCode" th:field="*{moduleCode}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">功能模块名称：</label>
                <div class="col-sm-8">
                    <input name="moduleName" th:field="*{moduleName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">所属系统：</label>
                <div class="col-sm-8">
                    <select name="sysId" class="form-control m-b" required>
                        <option th:each="mdSys : ${mdSysList}" th:text="${mdSys.sysName}" th:value="${mdSys.sysId}" th:field="*{sysId}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">系统内排序号：</label>
                <div class="col-sm-8">
                    <input name="moduleOrder" th:field="*{moduleOrder}" class="form-control" type="text" required>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "metadata/module";
        $("#form-module-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-module-edit').serialize());
            }
        }
    </script>
</body>
</html>